<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="fm"%>    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<style type="text/css">
   .error{
      color:red;
      font-weight: 900;
   }
</style>
</head>
<body>
 <h3>修改员工</h3>
 <fm:form modelAttribute="emp" 
       action="${pageContext.request.contextPath}/emp"
        method="POST">
        <input type="hidden"  name="_method" value="put"/>
        <fm:hidden path="empno"/>
      姓名:<fm:input path="ename"/>
        <span>
           <fm:errors path="ename" cssClass="error"></fm:errors>
        </span>
       <br/>
      性别: <label>
             <fm:radiobutton path="esex" value="男"/> 男
       </label>
       <label>
          <fm:radiobutton path="esex"  value="女"/> 女
       </label> <br/>
       年龄:<fm:input path="eage"/>
        <span>
           <fm:errors path="eage" cssClass="error"></fm:errors>
        </span>
        <br/>
        薪资:<fm:input path="esalary"/>
           <span>
              <fm:errors path="esalary"  cssClass="error"></fm:errors>
           </span>
         <br/>
        部门: <fm:select path="dept.deptno" items="${depts}"
          itemLabel="dname" itemValue="deptno"  ></fm:select>
          <br/>
       经理: <fm:select path="mgr.empno"  items="${mgrs}"
         itemLabel="ename" itemValue="empno"
       ></fm:select>  <br/>
       <input type="submit" value="修改"/>
       </fm:form>
 
</body>
</html>